#include "MGUI_Label.h"
#include "MGUI_Engine.h"

namespace Myway {

	ImplementRTTI(MGUI_Label, MGUI_Widget);

	MGUI_Label::MGUI_Label(const MGUI_LookFeel * _lookfeel, MGUI_Widget * _parent)
		: MGUI_Widget(_lookfeel, _parent)
	{
		mTextBox = new MGUI_TextBox(this);
		mTextBox->SetAlign(MGUI_Align::Left | MGUI_Align::VCenter);
	}

	MGUI_Label::~MGUI_Label()
	{
	}

	void MGUI_Label::SetCaption(const MGUI_String & caption)
	{
		mTextBox->SetCaption(caption);
	}

	const MGUI_String & MGUI_Label::GetCaption() const
	{
		return mTextBox->GetCaption();
	}

	void MGUI_Label::SetFont(MGUI_Font * _font)
	{
		mTextBox->SetFont(_font);
	}

	MGUI_Font * MGUI_Label::GetFont()
	{
		return mTextBox->GetFont();
	}

}